import request, { type ListQuery, type ListResponse } from "@/utils/request";

const BASE_URL = "/api";

const CommissiontAPI = {
  getCommissiontList: (params: CommissiontListParams) => {
    return request.get<any, ListResponse<CommissiontType>>(`${BASE_URL}/agent/bill/`, {
      params,
    });
  },
};

export type CommissiontListParams = {} & ListQuery;

export type CommissiontType = {
  id: number; //记录 ID
  created_at: string; //创建时间
  updated_at: string; //更新时间
  is_active: boolean; //是否可用
  remark: string; //备注
  amount: string; //金额
  agent: number;
  account_line: number;
};

export default CommissiontAPI;
